#include "StdAfx.h"
#include "StateWnd.h"

StateWnd::StateWnd(HWND hwnd, HDC hDC, int canvasWidth, int canvasHeigth)
{
 	m_hParent = hwnd;
 	m_hDC = hDC;
	m_nWidth = canvasWidth;
	m_nHeigth = canvasHeigth;
}


StateWnd::~StateWnd(void)
{

}

void StateWnd::showWnd(Graphics *memG, long x, long y, long size)
{
	memG->FillRectangle(&SolidBrush(Color(0x50,0x8B,0xBE,0xD8)),x,y,size,size);
}

void StateWnd::showWnd(long x, long y, long size)
{	
	Graphics G(m_hDC);
	Bitmap *pBit = new Bitmap(m_nWidth,m_nHeigth);
	Graphics *memG = new Graphics(pBit);
	memG->FillRectangle(&SolidBrush(Color(0x70,0x8B,0xBE,0xD8)),x,y,size,size);	
	
	G.DrawImage(pBit,0,0,m_nWidth, m_nHeigth);

	delete pBit;
	delete memG;
	InvalidateRect(m_hParent,NULL,FALSE);
}